package br.com.array.android.ma.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.ListView;
import br.com.array.android.ma.R;

/**
 * Created by desenvolv04 on 14/05/2014.
 */
public class HistoricoView extends LinearLayout {

    private ListView listView;


    public HistoricoView(Context context) {
        this(context, null);
    }

    public HistoricoView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public HistoricoView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        inflate(context, R.layout.energia_reativa_main, this);
        listView = (ListView) findViewById(R.id.lv_historico);
    }

    public void setAdapertListView(BaseAdapter adapter){
        listView.setAdapter(adapter);
    }


    public void setOnItemClickListenerView(AdapterView.OnItemClickListener listener){
        listView.setOnItemClickListener(listener);
    }

}
